import urllib.request
from lxml import etree

url = "http://www.baidu.com"

response = urllib.request.urlopen(url)

content = response.read().decode("utf-8")

tree = etree.HTML(content)

text_list = tree.xpath("//body//input[@id='su']/@value")

print(text_list)
